package com.player.thirdGroup.controller;

import com.player.thirdGroup.entity.Log;
import com.player.thirdGroup.entity.Message;
import com.player.thirdGroup.service.LogService;
import com.player.thirdGroup.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * @author VULCAN
 * @create 2019-12-28 7:49
 * @desc 消息
 **/
@Controller
public class MessageController {
    @Autowired
    private MessageService messageService;
//    //分页列表
//    @GetMapping("loglist")
//    @ResponseBody
//    public Page<Message> findAll(int page, int size){
//        return messageService.findAll(page,size);
//    }

    //log列表
    @GetMapping("findmessagelist")
    @ResponseBody
    public List<Message> messageunderlist(){
        List<Message> all = messageService.findAll();
        return all;
    }
    //log列表 中转
    @GetMapping("message")
    public String messageinder(Model model){
        return "message";
    }
}
